package cn.ruleengine.web.function;

import cn.hutool.core.date.DateUtil;
import cn.ruleengine.core.annotation.Executor;
import cn.ruleengine.core.annotation.Function;
import cn.ruleengine.core.annotation.Param;

import java.util.Date;

/**
 * 当前时间按天回退
 * @author xianrensawang
 * @date 2021/7/13
 */
@Function
public class DateOffsetByDay {

    @Executor
    public Date offset(@Param("day")Integer day) {
        return DateUtil.offsetDay(new Date(), day);
    }

}
